<template>
  <div class="order-logs">
    <el-timeline v-loading="loading" :reverse="false">
      <el-timeline-item
        v-for="(log, index) in logs"
        :key="index"
        :timestamp="log.createTime"
        :hide-timestamp="true"
      >
        {{ log.info }}
      </el-timeline-item>
    </el-timeline>
  </div>
</template>
<script>
export default {
  props: {
    value: {
      type: String,
      default: ''
    },
    path: {
      type: String,
      default: '/api/pur/order-info/log/'
    },
    datalogs: { type: Array, default: () => { return [] } }
  },
  data() {
    return {
      logs: this.datalogs,
      loading: false
    }
  },
  created() {
    // this.init()
  },
  methods: {
    // init() {
    //   const that = this
    //   const url = that.$http.conf.api.get('wms').url + that.path + that.value
    //   that.$http.get(url).then((res) => {
    //     if (res.code !== 200) {
    //       that.$message.error(res.message)
    //       return
    //     }
    //     that.logs = res.data
    //   })
    //     .catch(e => {
    //       console.error(e)
    //       that.$message.error('获取异常')
    //     })
    // }
  }
}
</script>
<style scoped>
.order-logs{
  padding-top: 20px;
  position: absolute;
                z-index: 1;
                width:100%;
                font-size: 12px;
                overflow-y: auto;
                height: 230px;
}
</style>
